#ifndef _ASSETMANAGER_H_
#define _ASSETMANAGER_H_

#include "common.h"
#include "XModel.h"

class CAssetManager
{
private:

	//////////////////////////////////////////////////////////////////////////
	// Creation Coms
	IDirect3DDevice9*	m_pDev;
	D3DPOOL				m_ePoolType;

	//////////////////////////////////////////////////////////////////////////
	// Utilities
	bool				m_bInitialized;
	int					m_nNumTextures;
	int					m_nNumModels;
	HRESULT				m_Error;
	
	map<PhTextureID, pair<string, IDirect3DTexture9*>>	m_pTextures;
	map<PhModelID, CBaseModel*>	m_pModels;


	CAssetManager(void);
	~CAssetManager(void);
	CAssetManager(const CAssetManager&){}
	CAssetManager& operator=(const CAssetManager&){}

public:

	bool Initialize(IDirect3DDevice9* _pDev);
	bool Shutdown(void);
	bool Reload(void);

	PhTextureID AddTexture(string szTextureName);
	const IDirect3DTexture9* GetTexture(PhTextureID);

	PhModelID AddModel(string szModelName);
	const CBaseModel* GetModel(PhModelID);
	
	static CAssetManager* GetInstance(void);
};

#endif